<template>
  <!-- hidden PageHeaderWrapper title demo -->
  <page-header-wrapper :title="false" >
    <a-card :body-style="{padding: '24px 32px'}" :bordered="false">
      <!-- <a-alert type="error" message="修改商品的考核成本、提成比例、固定提成即时生效，如果已经下账没有及时修改考核成本、提成比例、固定提成可使用本功能将自生效日期之日起(包含生效之日)所有商品销售按照当前设置重新计算提成。" /> -->
      <a-form @submit="handleSubmit" :form="form">
        <a-form-item
          label=" "
          :labelCol="{lg: {span: 7}, sm: {span: 7}}"
          :wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
          :colon="false"
        >
          <a-input v-decorator="['word', { initialValue: model?.id }]" />
        </a-form-item>
        <a-form-item
          :wrapperCol="{ span: 24 }"
          style="text-align: center"
        >
          <a-button htmlType="submit" type="primary" icon="check">查询</a-button>
          <!-- <a-button style="margin-left: 8px">{{ $t('form.basic-form.form.save') }}</a-button> -->
        </a-form-item>
      </a-form>
    </a-card>
  </page-header-wrapper>
</template>
  
<script>
  import { setGoodsEffDateUsingPOST } from '@/api/api/shangpinguanli.ts'
  export default {
    name: 'SecondhandSearch',
    data () {
      return {
        form: this.$form.createForm(this)
      }
    },
    methods: {
      // handler
      handleSubmit (e) {
        e.preventDefault()
        this.form.validateFields((err, values) => {
          if (!err) {
            console.log(values)
            // setGoodsEffDateUsingPOST({ ...values }).then(() => { 
            //   this.$message.success('操作成功')
            //   // 重置表单数据
            //   this.form.resetFields()
            // })
            // .catch((error) => {
            //   this.$message.error(((error.response || {}).data || {}).msg || '请求出现错误')
            // })
          }
        })
      }
    }
  }
</script>